package com.qwz.example;

import com.qwz.example.product.ExportBodyModel;
import com.qwz.example.product.ExportFooterModel;
import com.qwz.example.product.ExportHeaderModel;
/**  
* @Description: xml版本生成器
* @Package com.qwz.example.XmlBuilder
* @author Qiuwuzhi
* @date 2019/12/16 16:11
* @version V1.0
*/
public class XmlBuilder implements Builder {
    StringBuilder builder = new StringBuilder(12);
    public void buildHeader(ExportHeaderModel headerModel) {
        builder.append(headerModel.getHeader());
    }
    public void buildBody(ExportBodyModel boydModel) {
        builder.append(boydModel.getBody());
    }
    public void buildFooter(ExportFooterModel footerModel) {
        builder.append(footerModel.getFoot());
    }
    public String getResult(){
        return builder.toString();
    }
}
